package com.hongyun.tms.common.dto.mrate;

import com.alibaba.excel.annotation.ExcelProperty;
import com.hongyun.tms.common.annotation.excel.ExcelInfo;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 费率导出模板 响应
 *
 * @author liPeng
 * @date 2024-05-31
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ExcelInfo(fileName = "拖轮费率模板")
public class MRateTemplateDto implements Serializable {

    @ApiModelProperty(value = "船长-起")
    @NotNull(message = "船长-起 不能为空")
    @Min(value = 0, message = "船长-起的最小长度为0")
    @Max(value = 999, message = "船长-起的最大长度为999")
    @ExcelProperty(value = "船长-起(必填)", index = 0)
    private Integer lengthStart;

    @ApiModelProperty(value = "船长-止")
    @NotNull(message = "船长-止 不能为空")
    @Min(value = 0, message = "船长-止的最小长度为0")
    @Max(value = 999, message = "船长-止的最大长度为999")
    @ExcelProperty(value = "船长-止(必填)", index = 1)
    private Integer lengthEnd;

    @ApiModelProperty(value = "贸别：内贸，外贸")
    @NotBlank(message = "贸别不能为空")
    @ExcelProperty(value = "贸别(必填;内贸/外贸 任选其一)", index = 2)
    private String tradeType;

    @ApiModelProperty(value = "船舶类型代码")
    @NotBlank(message = "船舶类型代码不能为空")
    @ExcelProperty(value = "船舶类型(必填;客船/油船/散货船等 任填一项即可)", index = 3)
    private String shipKindCode;

    @ApiModelProperty(value = "费率")
    @NotNull(message = "费率不能为空")
    @Min(value = 0, message = "费率不能小于0")
    @Max(value = 999999, message = "费率不能超过999999")
    @ExcelProperty(value = "费率(必填;例:12000)", index = 4)
    private Long rate;
}

